package com.haoyi.feignapi.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface ErpMapper {
    String getOcmOrderMaxCode();

    @Select({
            "<script>",
            "SELECT KC47.oea_file.OEA01 FROM KC47.oea_file",
            "WHERE oea12 IN",
            "<foreach item='item' collection='search' open='(' separator=',' close=')'>",
            "#{item}",
            "</foreach>",
            "</script>"
    })
    List<String> getErpCode(List<String> search);

    List<Map<String, Object>> getErpInventory(Map<String, Object> paramMap);

    List<Map<String, Object>> getErpParts(Map<String, Object> paramMap);

    List<Map<String, Object>> getOrderErpCode(List<String> ocm_code_list);


}
